package middleware

import (
	"fmt"

	"github.com/gogf/gf/v2/net/ghttp"
)

func Middleware(r *ghttp.Request) {
	fmt.Println("Middleware 1")
	r.Middleware.Next()
	fmt.Println("Middleware 1 end")
}
func ErrorHandler(r *ghttp.Request) {
	fmt.Println("ErrorHandler 1")
	// 执行路由回调函数
	r.Middleware.Next()
	// 判断是否产生错误
	fmt.Println("ErrorHandler 1 end")
}
